<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文本检索 - 跨媒体内容检索和理解系统</title>
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        /* 文本检索特定样式 */
        .text-search-container {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .search-features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .feature-card {
            background: #f8fafc;
            padding: 20px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            transition: all 0.3s;
        }

        .feature-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

        .feature-card i {
            font-size: 24px;
            color: #4299e1;
            margin-bottom: 12px;
        }

        .feature-card h3 {
            font-size: 18px;
            color: #2d3748;
            margin-bottom: 8px;
        }

        .feature-card p {
            color: #718096;
            font-size: 14px;
            line-height: 1.6;
        }

        .search-options {
            background: #f8fafc;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 24px;
        }

        .options-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
        }

        .option-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #4a5568;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.3s;
        }

        .option-item:hover {
            background: #ebf8ff;
        }

        .option-item i {
            color: #4299e1;
        }

        .generation-input {
            background: white;
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .generation-input textarea {
            width: 100%;
            padding: 16px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            resize: vertical;
            min-height: 120px;
            font-size: 16px;
            transition: all 0.3s;
            margin-bottom: 16px;
        }

        .generation-input textarea:focus {
            border-color: #4299e1;
            outline: none;
            box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
        }

        .generation-options {
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .generation-options select {
            padding: 12px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            color: #4a5568;
            background: #f8fafc;
            cursor: pointer;
        }

        .generate-btn {
            background: #4299e1;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            transition: all 0.3s;
        }

        .generate-btn:hover {
            background: #3182ce;
        }

        .recent-searches {
            margin-top: 24px;
            padding: 20px;
            background: #f8fafc;
            border-radius: 12px;
        }

        .recent-searches h3 {
            font-size: 16px;
            color: #2d3748;
            margin-bottom: 16px;
        }

        .search-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .search-tag {
            padding: 6px 12px;
            background: #ebf8ff;
            color: #4299e1;
            border-radius: 16px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .search-tag:hover {
            background: #bee3f8;
        }
    </style>
</head>
<body>
    <div class="layout">
        <!-- 侧边栏导航 -->
        <div class="sidebar">
            <div class="logo">
                <span>跨媒体内容检索和理解系统</span>
            </div>
            <nav class="nav-menu">
                <a href="text-search.html" class="nav-item active" data-type="text">文本检索</a>
                <a href="audio-search.html" class="nav-item" data-type="audio">语音检索</a>
                <a href="image-search.html" class="nav-item" data-type="image">图像内容理解</a>
                <a href="image-retrieval.html" class="nav-item" data-type="image-retrieval">图像检索</a>
                <a href="video-search.html" class="nav-item" data-type="video">视频检索</a>
            </nav>
        </div>

        <!-- 主要内容区 -->
        <div class="main-content">
            <div class="search-section">
                <h2><i class="fas fa-image"></i> 文本检索图像</h2>
                
                <!-- 功能特点展示 -->
                <div class="search-features">
                    <div class="feature-card">
                        <i class="fas fa-brain"></i>
                        <h3>智能理解</h3>
                        <p>基于深度学习的文本理解，准确识别检索意图</p>
                    </div>
                    <div class="feature-card">
                        <i class="fas fa-magic"></i>
                        <h3>精准匹配</h3>
                        <p>多维度图像特征提取，确保检索结果精准度</p>
                    </div>
                    <div class="feature-card">
                        <i class="fas fa-bolt"></i>
                        <h3>快速响应</h3>
                        <p>优化的检索算法，快速响应速度</p>
                    </div>
                </div>

                <!-- 检索选项 -->
                <div class="search-options">
                    <div class="options-grid">
                        <label class="option-item">
                            <input type="checkbox" checked>
                            <i class="fas fa-image"></i>
                            <span>包含图片</span>
                        </label>
                        <label class="option-item">
                            <input type="checkbox" checked>
                            <i class="fas fa-palette"></i>
                            <span>颜色匹配</span>
                        </label>
                        <label class="option-item">
                            <input type="checkbox" checked>
                            <i class="fas fa-object-group"></i>
                            <span>场景匹配</span>
                        </label>
                        <label class="option-item">
                            <input type="checkbox" checked>
                            <i class="fas fa-tags"></i>
                            <span>标签匹配</span>
                        </label>
                    </div>
                </div>

                <div class="text-search-container">
                    <!-- 文本生成图像功能 -->
                    <div class="image-generation">
                        <div class="generation-input">
                            <textarea placeholder="请输入要检索图像的文本描述，例如：'一只在草地上奔跑的金毛犬' 或 '日落时分的海滩风景'..." rows="3"></textarea>
                            <div class="generation-options">
                                <select name="image-size">
                                    <option value="1024x1024">1024x1024</option>
                                    <option value="512x512">512x512</option>
                                </select>
                                <button class="generate-btn">
                                    <i class="fas fa-magic"></i>
                                    检索图像
                                </button>
                            </div>
                        </div>

                        <!-- 最近搜索记录 -->
                        <div class="recent-searches">
                            <h3><i class="fas fa-history"></i> 最近检索</h3>
                            <div class="search-tags">
                                <span class="search-tag">日落风景</span>
                                <span class="search-tag">可爱动物</span>
                                <span class="search-tag">城市建筑</span>
                                <span class="search-tag">自然风光</span>
                                <span class="search-tag">美食摄影</span>
                            </div>
                        </div>

                        <div class="generation-result" style="display: none;">
                            <h4>检索结果</h4>
                            <div class="generated-image">
                                <img src="" alt="检索的图像">
                                <button class="download-btn">
                                    <i class="fas fa-download"></i>
                                    下载图像
                                </button>
                            </div>
                            <div class="generation-info">
                                <span class="status"></span>
                                <span class="time"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="text-search.js"></script>
</body>
</html> 